<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="../../aui/css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.picker.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.poppicker.css"/>
    <link rel="stylesheet" type="text/css" href="../../aui/css/aui-iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/css.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper-3.3.1.min.css"/>

</head>

<body class="bg7">
<div id="app">
    <div id="wraps" class="flex-wrap bgn flex-vertical">
        <div class="xiangqing_fjr ">
            <div class="pingjias pingjias2 border-radius-30">
                <div class="pingjiastitle">
                    <i class="icon iconfont icon-close"></i>
                </div>
                <div class="pingjiasbody">
                    <div class="pingjiasbody_img pingjiasbody_img2">
                        <img src="../../image/avr2.jpg" alt="">
                    </div>
                    <div class="pingjiasbody_bt mt-20">
                        <span>猫朵朵</span>
                        <div class="sex_and_age">
                            <i class="icon iconfont icon-woman"></i>
                            <em>18</em>
                        </div>
                    </div>
                    <div class="rongyu">
                        <span>信誉值：260</span>
                    </div>
                    <div class="my_logout mt20 mb30">
                        邀请Ta                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../script/mui.min.js"></script>
<script src="../../script/mui.picker.js"></script>
<script src="../../script/mui.poppicker.js"></script>
<script src="../../aui/js/aui.js"></script>
<script src="../../script/vue2.js"></script>
<script src="../../script/vue-resource.min.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/city.data-3.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    apiready = function () {
        function lt(id, xm, tx) {
            api
            api.openWin({
                reload: true,
                name: 'chat',
                url: 'widget://html/win_chat.html',
                pageParam: {
                    id: id,
                    zh: xm,
                    tx: tx
                },
                vScrollBarEnabled: false,
            });
            if ($api.getStorage('id') == id) {
            } else {
                var rong = api.require('rongCloud2');
                rong.clearMessagesUnreadStatus({
                    conversationType: 'PRIVATE',
                    targetId: id
                }, function (ret, err) {
                })
            }
            api.sendEvent({
                name: 'hhxx'
            });
        }

        var main = new Vue({
            el: "#app",
            data: {
                birthday: '',
                province: '',
                city: '',
                country: '',
                img: '',
                id: api.pageParam.id,
                gender: '',
                avatar: '',
                username: api.pageParam.username,
                distance: api.pageParam.distance,
                age: '',
                score: '',
                nickname:''
            },
            mounted: function () {
                var that = this;
                this.getmessage()
            },

            methods: {
                yaoqing: function () {
                    console.log(this.nickname);
                    this.getstart()
                    lt(this.id, this.nickname, this.avatar)
                },
                getmessage: function () {
                    var that = this;
                    showProgress();
                    var token = $api.getStorage('userInfo').token
                    api.ajax({
                        url: ajaxRoute.pushinfo,
                        method: 'post',
                        data: {
                            values: {
                                token: token,
                                id: that.id
                            }
                        }
                    }, function (res, err) {
                        if (res.code == 1) {
                            console.log(JSON.stringify(res));
                            console.log("hhhhhhhhhhhhhhhh");
                            that.gender = res.data.gender
                            that.birthday = res.data.birthday
                            that.province = res.data.province
                            that.city = res.data.city
                            that.country = res.data.country
                            that.avatar = ajaxUrl + res.data.avatar
                            that.nickname = res.data.nickname
                            that.score = res.data.score
                            that.username = res.data.username
                            that.age = res.data.age
                            console.log(that.age);
                        } else {
                            api.hideProgress();
                            api.toast({msg: res.msg, location: 'middle'});
                        }
                    });
                },
                getstart: function () {
                    var that = this;
                    showProgress();
                    var token = $api.getStorage('userInfo').token
                    api.ajax({
                        url: ajaxRoute.meetingstart,
                        method: 'post',
                        data: {
                            values: {
                                token: token,
                                uid: that.id
                            }
                        }
                    }, function (res, err) {
                        if (res.code == 1) {
                            console.log("scdd");
                            console.log(JSON.stringify(res));
                        } else {
                            api.hideProgress();
                            api.toast({msg: res.msg, location: 'middle'});
                        }
                    });
                },
            },
            filters: {
                getsex: function (e) {
                    if (e) {
                        return '男'
                    } else {
                        return '女'
                    }
                },
                filtersImg: function (img) {
                    var imgs = ajaxUrl + '/' + img
                    console.log(imgs)
                    return imgs;
                }
            }
        })
    }
</script>

</html>
